package cn.hxzy.entity.sourceEntity;

import java.math.BigDecimal;

import cn.hxzy.entity.siteEntity.Site;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author ao.Li
 * @since 2023-06-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tt_source_list")
@ApiModel(value = "SourceList对象", description = "")
public class SourceList implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "货源编号")
    @TableId(type = IdType.INPUT)
    private String sourceId;

    @NotNull
    @ApiModelProperty(value = "货主编号")
    private String userId;

    @NotNull
    @ApiModelProperty(value = "货物名称")
    private String goodsName;

    @ApiModelProperty(value = "企业名称")
    private String companiesName;

    @ApiModelProperty(value = "装车站点编号")
    private String loadingSiteId;

    @ApiModelProperty(value = "卸车站点编号")
    private String unloadingSiteId;

    @Min(value = 0)
    @ApiModelProperty(value = "发货总量（吨）")
    private Double goodsTotal;

    @ApiModelProperty(value = "专属车队编号")
    @TableField("exclusive_carTeam_id")
    private String exclusiveCarteamId;

    @ApiModelProperty(value = "装货量")
    private Double loadingCount;

    @ApiModelProperty(value = "卸货量")
    private Double unloadingCount;

    @DecimalMin(value = "0")
    @ApiModelProperty(value = "亏吨扣费")
    private BigDecimal lossCost;

    @ApiModelProperty(value = "结算主体编号")
    private String settlerId;

    @NotNull
    @ApiModelProperty(value = "供应商名称")
    private String vendorName;

    @Min(value = 0)
    @ApiModelProperty(value = "货物余量")
    private Double goodsHeadroom;

    @Min(value = 0)
    @ApiModelProperty(value = "服务费率")
    private Double serviceRate;

    @DecimalMin(value = "0")
    @ApiModelProperty(value = "运价")
    private BigDecimal sourceFreight;

    @DecimalMin(value = "0")
    @ApiModelProperty(value = "含税运价")
    private BigDecimal sourceFreightTax;

    @ApiModelProperty(value = "货源状态")
    private Integer sourceStatus;

    @TableField(exist = false)
    private String sourceStatusValue;

    @ApiModelProperty(value = "发布时间")
    private Date postsTime;

    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "装车点对象")
    @TableField(exist = false)
    private Site loadingSite;

    @ApiModelProperty(value = "卸车站点对象")
    @TableField(exist = false)
    private Site unloadingSite;
}
